#include <boost/tokenizer.hpp>
#include <string>
#include <iostream>

int main()
{
	typedef boost::tokenizer<boost::escaped_list_separator<char> > csv_tokenizer;
	std::string s = "Boost,\"C++ libraries\"";
	csv_tokenizer tok0(s);
	for (csv_tokenizer::iterator it = tok0.begin(); it!=tok0.end(); ++it)
		std::cout << *it << std::endl;


	typedef boost::tokenizer<boost::offset_separator> offset_tokenizer;
	s = "Boost C++ libraries";
	int offsets[] = {5,5,9};
	boost::offset_separator sep(offsets, offsets + 3);
	offset_tokenizer tok1(s,sep);
	for (offset_tokenizer::iterator it = tok1.begin(); it!=tok1.end(); ++it)
		std::cout << *it << "#" << std::endl;
}